package demo09_decorator.decorator;

import demo09_decorator.Component.EncryptionModule;

import java.math.BigDecimal;

public class ReverseCharEncyption extends CharDecorator {

    public ReverseCharEncyption(EncryptionModule<String> stringEncryptionModule) {
        super(stringEncryptionModule);
    }
    @Override
    public String encypt(String str) {
        StringBuilder stringBuilder = new StringBuilder(super.encypt(str));
        return stringBuilder.reverse().toString();
    }
}
